package com.zhongge.service;


import com.zhongge.dao.impl.StudentDaoImpl;
import com.zhongge.entity.Student;

import java.util.ArrayList;

/**
 * @ClassName StudentService
 * @Description TODO
 * @Author zhongge
 * @Version 1.0
 */
public class StudentService {
    private StudentDaoImpl studentDao = new StudentDaoImpl();
    public ArrayList<Student> findAll() {
       return studentDao.findAll();
    }

    public Student getById(Integer id) {
        return studentDao.getById(id);
    }


    public boolean addStudent(Student student) {
        return studentDao.addStudent(student);
    }



    public boolean updateById(Student student) {
        return studentDao.updateById(student);
    }


    public boolean deleteById(Integer id) {
        return studentDao.deleteById(id);
    }
}
